﻿@{
    ViewBag.Title = "皮肤管理";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
@model List<UcAsp.Net.Model.Theme>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-signal"></i></span>
                    <h5>当前Web皮肤</h5>
                </div>
                <div class="widget-content">
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="span6 center">
                                <img src="/themes/@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme/config/bigdefault.gif" />


                            </div>
                            <div class="span4">
                                <div class="btn-group">
                                    <a class="btn  btn-danger advset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme" href="/Admin/CssManager?theme=@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme"><i class="icon-pencil icon-white"></i>CSS设置</a>
                                    <a class="btn  btn-danger advset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme" href="/Admin/AdvManage?theme=@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme"><i class="icon-pencil icon-white"></i>广告位设置</a>
                                    <a class="btn  btn-danger subjectset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme" href="/Admin/SubjectManage?theme=@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme"><i class="icon-pencil icon-white"></i>主题设置</a>


                                    <a class="btn  btn-danger categoriesset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme" href="/Admin/CategoriesThemes?theme=@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme"><i class="icon-pencil icon-white"></i>分类模板</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-signal"></i></span>
                    <h5>当前Mobile皮肤</h5>
                </div>
                <div class="widget-content">
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="span6 center">
                                <img src="/themes/@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme/config/bigdefault.gif" />


                            </div>
                            <div class="span4">
                                <div class="btn-group">
                                    <a class="btn  btn-danger advset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme" href="/Admin/CssManager?theme=@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme"><i class="icon-pencil icon-white"></i>CSS设置</a>
                                    <a class="btn  btn-danger advset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme" href="/Admin/AdvManage?theme=@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme"><i class="icon-pencil icon-white"></i>广告位设置</a>
                                    <a class="btn  btn-danger subjectset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme" href="/Admin/SubjectManage?theme=@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme"><i class="icon-pencil icon-white"></i>主题设置</a>


                                    <a class="btn  btn-danger categoriesset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme" href="/Admin/CategoriesThemes?theme=@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme"><i class="icon-pencil icon-white"></i>分类模板</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-signal"></i></span>
                    <h5>更多皮肤选择</h5>
                </div>
                <div class="widget-content">
                    <div class="row-fluid">
                        @foreach (UcAsp.Net.Model.Theme t in Model)
                        {
                            <div class="span3 center" style="text-align: center;">
                                <div class ="span12">
                                    <img src="/themes/@t.Path/config/@t.ImageUrl" />
                                </div>
                                <div class="span12">
                                    @t.Name
                                 </div>
                                    <div class="btn-group">
                                        <span class="btn btn-danger savethemes" data-id="@t.Path"><i class="icon-pencil icon-white"></i>Web应用</span><span class="btn btn-danger savemobilethemes" data-id="@t.Path"><i class="icon-pencil icon-white"></i>Mobile应用</span>

                                    </div>
                                </div>
                        }
                        </div>
                    </div>
                </div>





                </div>
            </div>
            <script>
                $(function () {
                    $(".advset").click(function () {
                        $.get("/Admin/AdvManage?theme=" + $(this).attr("data-id"), function (dataResult) {
                            $.facebox(dataResult, "ucaspfacebox");
                        });
                    });
                    $(".subjectset").click(function () {
                        $.get("/Admin/SubjectManage?theme=" + $(this).attr("data-id"), function (dataResult) {
                            $.facebox(dataResult, "ucaspfacebox");
                        });
                    });
                    $(".savethemes").click(function () {
                        $.get("/Admin/SelectThemes?theme=" + $(this).attr("data-id"), function (dataResult) {
                            window.location = "/admin/ThemesManage";
                        });
                    });
                    $(".savemobilethemes").click(function () {
                        $.get("/Admin/SelectThemes?mobiletheme=" + $(this).attr("data-id"), function (dataResult) {
                            window.location = "/admin/ThemesManage";
                        });
                    });
                });
            </script>
